#include <stdio.h>

int main(int argc, char const *argv[])
{
    char         a = 10 ;
    short        b = 10 ;
    int          c = 10 ;
    long         d = 10 ;
    long int     e = 10 ;
    long long    f = 10 ;
    float        g = 10.1 ;
    double       h = 10.2 ;
    long double  i = 10.3 ;

    char         *pa = &a ;
    short        *pb = &b ;
    int          *pc = &c ;
    long         *pd = &d ;
    long int     *pe = &e ;
    long long    *pf = &f ;
    float        *pg = &g ;
    double       *ph = &h ;
    long double  *pi = &i ;

/****指针变量存放的是地址量， 这个系统是64位的系统， 每一个地址用64位表示， 因此每一个地址都是64位的
   * 一个地址用64位表示， 占用字节8个， 存放一个地址的变量要使用8个字节来保存这个地址
   * 因此指针变量统一占用8个字节的存储空间****/

/****字符指针类型****/
    printf("sizeof(char *)=%d\n",sizeof(char *));
    printf("sizeof(pa    )=%d\n",sizeof(pa    ));

/****短整型指针类型****/
    printf("sizeof(short *)=%d\n",sizeof(short *));
    printf("sizeof(pb    )=%d\n",sizeof(pb    ));

/****整型指针类型****/
    printf("sizeof(int  *)=%d\n",sizeof(int *));
    printf("sizeof(pc    )=%d\n",sizeof(pc    ));

/****长整型指针类型****/
    printf("sizeof(long *)=%d\n",sizeof(long *));
    printf("sizeof(pd    )=%d\n",sizeof(pd    ));

/****long int 指针类型****/
    printf("sizeof(long int *)=%d\n",sizeof(long int *));
    printf("sizeof(pe    )=%d\n",sizeof(pe    ));

/****long long指针类型****/
    printf("sizeof(long long *)=%d\n",sizeof(long long *));
    printf("sizeof(pf    )=%d\n",sizeof(pf    ));

/****双精度指针类型****/
    printf("sizeof(float *)=%d\n",sizeof(float *));
    printf("sizeof(pg    )=%d\n",sizeof(pg    ));


/****双精度指针类型****/
    printf("sizeof(double *)=%d\n",sizeof(double *));
    printf("sizeof(ph    )=%d\n",sizeof(ph    ));

/****长双精度指针类型****/
    printf("sizeof(long double *)=%d\n",sizeof(long double *));
    printf("sizeof(pi    )=%d\n",sizeof(pi    ));

    printf("*************************\n");


/****pa++ (pa) + sizeof(char) * 1, 因此地址加1 ****/
    printf("sizeof(char)=%d\n",sizeof(char));
    printf("pa=%p\n",pa);
    pa++;
    printf("pa=%p\n",pa);

/****pb++ (pb) + sizeof(shtor) * 1, 因此地址加2 ****/
    printf("sizeof(short)=%d\n",sizeof(short));
    printf("pb=%p\n",pb);
    pb++;
    printf("pb=%p\n",pb);

/****pc++ (pc) + sizeof(int) * 1, 因此地址加4 ****/
    printf("sizeof(int)=%d\n",sizeof(int));
    printf("pc=%p\n",pc);
    pc++;
    printf("pc=%p\n",pc);

/****pd++ (pd) + sizeof(long) * 1, 因此地址加 sizeof(long) ****/
    printf("sizeof(long)=%d\n",sizeof(long));
    printf("pd=%p\n",pd);
    pd++;
    printf("pd=%p\n",pd);

/****pe++ (pe) + sizeof(long int) * 1, 因此地址加 sizeof(long int) ****/
    printf("sizeof(long int)=%d\n",sizeof(long int));
    printf("pe=%p\n",pe);
    pe++;
    printf("pe=%p\n",pe);

/****pf++ (pf) + sizeof(long long) * 1, 因此地址加 sizeof(long long) ****/
    printf("sizeof(long long)=%d\n",sizeof(long long));
    printf("pf=%p\n",pf);
    pf++;
    printf("pf=%p\n",pf);

/****pg++ (pg) + sizeof(float) * 1,  因此地址加 sizeof(float) ****/
    printf("sizeof(float)=%d\n",sizeof(float));
    printf("pg=%p\n",pg);
    pg++;
    printf("pg=%p\n",pg);

/****ph++ (ph) + sizeof(double) * 1, 因此地址加 sizeof(doiuble) ****/
    printf("sizeof(double)=%d\n",sizeof(double));
    printf("ph=%p\n",ph);
    ph++;
    printf("ph=%p\n",ph);

/****pi++ (pi) + sizeof(long double) * 1, 因此地址加 sizeof(long double) ****/
    printf("sizeof(long double)=%d\n",sizeof(long double));
    printf("pi=%p\n",pi);
    pi++;
    printf("pi=%p\n",pi);


    return 0;
}
